// kX Driver / kX Driver Interface / kX Driver Effects Library
// Copyright (c) Eugene Gavrilov and WORM  2002-2004.
// All rights reserved

/*
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 */

// 10kX microcode
// Patch name: '3D Sound Gen'

char* soundgen_copyright="  WORM  ";
char* soundgen_engine="kX";
char* soundgen_comment="LGPL";
char* soundgen_created="March 10 2002";
char* soundgen_guid="82ed3514-615a-4aac-aee0-0ddaefa024e1";

char* soundgen_name = "3D Sound Gen";
int soundgen_itramsize=0,soundgen_xtramsize=7681;

dsp_register_info soundgen_info[]={
	{ "il",0x4000,0x7,0xffff,0x0 },
	{ "ir",0x4001,0x7,0xffff,0x0 },
	{ "sl",0x8000,0x8,0xffff,0x0 },
	{ "sr",0x8001,0x8,0xffff,0x0 },
	{ "g_1",0x8002,0x4,0xffff,0x66666665 },
	{ "g_2",0x8003,0x4,0xffff,0x28f5c28f },
	{ "g_21",0x8004,0x4,0xffff,0xd70a3d70 },
	{ "g_22",0x8005,0x4,0xffff,0x72e48e89 },
	{ "ps_3",0x8006,0x3,0xffff,0x0 },
	{ "ps_5",0x8007,0x3,0xffff,0x0 },

	{ "t_2_w",0x8008,0x4a,0xffff,0x0 },
	{ "&t_2_w",0x8009,0xb,0xffff,0x0 },
	{ "t_2_r",0x800a,0x2a,0xffff,0x780 },
	{ "&t_2_r",0x800b,0xb,0xffff,0x780 },

	{ "t_3_w",0x800c,0x4a,0xffff,0x781 },
	{ "&t_3_w",0x800d,0xb,0xffff,0x781 },
	{ "t_3_r",0x800e,0x2a,0xffff,0xf00 },
	{ "&t_3_r",0x800f,0xb,0xffff,0xf00 },

	{ "t_4_w",0x8010,0x4a,0xffff,0xf01 },
	{ "&t_4_w",0x8011,0xb,0xffff,0xf01 },
	{ "t_4_r",0x8012,0x2a,0xffff,0x1680 },
	{ "&t_4_r",0x8013,0xb,0xffff,0x1680 },

	{ "t_1_w",0x8014,0x4a,0xffff,0x1681 },
	{ "&t_1_w",0x8015,0xb,0xffff,0x1681 },
	{ "t_1_r",0x8016,0x2a,0xffff,0x1e00 },
	{ "&t_1_r",0x8017,0xb,0xffff,0x1e00 },
};

dsp_code soundgen_code[]={
	{ 0x0,0x8014,0x4000,0x8001,0x8002 },
	{ 0x0,0x800c,0x4001,0x8000,0x8002 },
	{ 0x0,0x8008,0x8016,0x800a,0x8004 },
	{ 0x0,0x8010,0x800e,0x8012,0x8004 },
	{ 0x0,0x8006,0x2040,0x8016,0x8003 },
	{ 0x0,0x8007,0x2040,0x800e,0x8003 },
	{ 0x0,0x8000,0x8006,0x800a,0x8005 },
	{ 0x0,0x8001,0x8007,0x8012,0x8005 },
};

#define R_G_1  0x8002
#define R_G_2  0x8003
#define R_G_21 0x8004
#define R_G_22 0x8005

#define R_T_1_W 0x8014
#define R_T_1_R 0x8016
#define R_T_2_W 0x8008
#define R_T_2_R 0x800a
#define R_T_3_W 0x800c
#define R_T_3_R 0x800e
#define R_T_4_W 0x8010
#define R_T_4_R 0x8012
